/*
 * ExameSolicitado.java
 *
 * Created on October 12, 2007, 10:45 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package petstore.model;

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity class ExameSolicitado
 * 
 * @author Tom Hayden
 */
@Entity
@Table(name = "exame_solicitado")
@AttributeOverrides( {
    @AttributeOverride(name="id", column=@Column(name="nrsolicitacao")),
    @AttributeOverride(name="description", column=@Column(name="dsresultado")),
    @AttributeOverride(name="active", column=@Column(name="ativo"))
})
public class ExameSolicitado extends CodeData {

    @Column(name = "dtsolicitacao")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dataSolicitacao;

    @Column(name = "dtentrega")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dataEntrega;

    @ManyToOne
    @JoinColumn(name="cdanimal")
    private Animal animal;

    @ManyToOne
    @JoinColumn(name="cdexame")
    private Exame exame;
    
    /** Creates a new instance of ExameSolicitado */
    public ExameSolicitado() {
    }

    public Date getDataSolicitacao() {
        return dataSolicitacao;
    }

    public void setDataSolicitacao(Date dataSolicitacao) {
        this.dataSolicitacao = dataSolicitacao;
    }

    public Date getDataEntrega() {
        return dataEntrega;
    }

    public void setDataEntrega(Date dataEntrega) {
        this.dataEntrega = dataEntrega;
    }

    public Animal getAnimal() {
        return animal;
    }

    public void setAnimal(Animal animal) {
        this.animal = animal;
    }

    public Exame getExame() {
        return exame;
    }

    public void setExame(Exame exame) {
        this.exame = exame;
    }
    
}
